<?php
header("Cache-Control: no-store, no-cache, must-revalidate");
header("Cache-Control: post-check=0, pre-check=0", false);
header("Pragma: no-cache");
$cab="<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n";
  Header("Content-type: application/xml; charset=utf-8"); 
 echo $cab;
$exame=$_GET["exame"];
$exame=addslashes($exame);
include ("admin\con_dbinterface.php");
		$sql="SELECT distinct tbtm.co_metodo,tbtm.no_metodo from historico.tb_bmh_tipo_metodologia tbtm
		inner join historico.tb_bmh_campo_exame rbem on (tbtm.co_metodo=rbem.co_metodo)
		where co_exame='$exame'
		ORDER BY no_metodo";
		//echo $sql;
		$res=pg_query($con,$sql);
		
		echo "<metodologias>";
			echo "<metodologia>";
				echo "<codigo>todos</codigo>";
				echo "<nome>Selecione a metodologia</nome>";	
				echo "</metodologia>";
		while($linha=pg_fetch_array($res))
			{
				echo "<metodologia>";
				echo "<codigo>$linha[0]</codigo>";
				echo "<nome>$linha[1]</nome>";	
				echo "</metodologia>";
			}
		echo "</metodologias>";
?>

		
